Field of the Invention
The present invention relates to a tape drive and, more specifically, to a method of searching for a reading order for recording groups on tape in a tape drive.
Description of the Related Art
Recently, tape drives are being used in file systems and virtual tape servers (VTS) to transfer large amounts of data at high speeds in accordance with the increasing capacity of tape media (referred to simply as “tapes” in the present specification). These tape drives require the ability to read a plurality of data elements written to scattered segments of tape as a whole.
However, when these data elements are written to scattered segments of tape which has a length of hundreds of meters and the data read without consideration to reading order, it takes a long time for the head to travel to (and be positioned at) the start of each data segment, and this results in significant delays in reading the request data from the host as a whole.
As a method of ameliorating this problem, a nearest neighbor algorithm (referred to as a “nearest selection method” in the present specification) and a pairwise exchange algorithm (referred to as a “last replacement method” in the present specification) have been disclosed in Japanese Patent Publication No. 2012-128937.